<template>
	<view style="background-color: aqua;" class="pox">
		<view class="titlle">
			<text>{{title}}</text>
		</view>
		<slot name="slotcontent" :isTop="isTop" :author="author" :comments="comments" :time="time"></slot>
		<view class="fle" style="margin: 10px;">
			<text style="color: red; margin: 3px;" v-if="isTop">置顶</text>
			<text style="margin: 3px;">{{author}}</text>
			<text style="margin: 3px;">{{comments}}评论</text>
			<view class="fle">
				<text style="margin: 6px;">{{time}}</text>
			</view>
		
		
</view>
<slot name="slotcontent" :isTop="isTop" :author="author" :comments="comments" :time="time">
		</slot>
		<slot name="tips"></slot>



	</view>
</template>

<script>
	export default {
		name: "cardViewText",
		props: {
			nID: {
				type: String,
				default: "默认ID"
			},
			title: {
				type: String,
				default: "默认标题"
			},
			isTop: {
				type: Boolean,
				default: false
			},
			author: {
				type: String,
				default: "默认作者"
			},
			comments: {
				type: Number,
				default: 0
			},
			time: {
				type: String,
				default: "2024.01.01"
			}
		},

		data() {
			return {

			};
		}

	}
</script>

<style>
	.titlle {
		font-size: 20px;
		margin: 10px;
	}

	.pox {
		border-radius: 15px;
	}

	.fle {
		flex: 1;
		display: flex;
		justify-content: flex-end;
	}
</style>